package com.durian.base.rxhttp.download

/**
 * 说明：ProgressT
 * <p/>
 * 作者：fanly
 * <p/>
 * 类型：Class
 * <p/>
 * 时间：2021/10/20 10:16 下午
 * <p/>
 * 版本：version 1.0
 */
class ProgressT<T> : Progress{
    private var _result: T? = null//http返回结果,上传/下载完成时调用

    constructor(progress: Progress) : super(progress.progress,progress.currentSize,progress.totalSize)

    constructor(result: T?){_result = result}

    constructor(progress: Int, currentSize: Long, totalSize: Long) : super(progress,currentSize,totalSize)


    fun getResult(): T? {
        return _result
    }

    fun setResult(result: T?) {
        this._result = result
    }

    override fun toString(): String {
        return "ProgressT{" +
                "progress=" + progress +
                ", currentSize=" + currentSize +
                ", totalSize=" + totalSize +
                ", result=" + _result +
                '}'
    }
}